Skip to content

feat!: achieve full compare-types parity for pipelines / fix loads of other types drift#9088

Merged
mikehardy merged 14 commits into
mainfrom
compare-types-work-queue
Jul 6, 2026
Merged

feat!: achieve full compare-types parity for pipelines / fix loads of other types drift#9088
mikehardy merged 14 commits into
mainfrom
compare-types-work-queue

Conversation

@mikehardy

@mikehardy mikehardy commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Compare-types and firebase-js-sdk modular parity across Firestore (including pipelines), Storage, Analytics, App Check, Remote Config, Functions, and cross-cutting callback signatures.

  • Firestore pipelines: expose search, define, documentMatches, score, geoDistance, and parent with native iOS/Android lowering; add constant(number, { preferIntegers }); remove unused RN-only Type export — firestore-pipelines compare-types config has no documented diffs
  • Modular sync signatures: align logEvent, initializeAppCheck, initializeFirestore, getRemoteConfig options, and aggregateFieldEqual with firebase-js-sdk sync/void shapes; clear related compare-types rows for Firestore, Storage, App Check, Functions, and Remote Config
  • Storage (breaking): UploadTask.pause(), resume(), and cancel() return synchronous boolean; setTaskStatus TurboModule spec and native bridge updated accordingly
  • Firestore transactions: export TransactionOptions; runTransaction(firestore, fn, options?) accepts { maxAttempts } through transactionBegin to native runTransactionWithOptions / TransactionOptions.Builder; validate explicit maxAttempts ≥ 1 (Max attempts must be at least 1); omitted options use the native default of 5 retries
  • Firestore aggregates: export aggregateQuerySnapshotEqual() alongside aggregateFieldEqual
  • Documented drift: FieldValue maximum / minimum remain unexported until iOS Firebase Firestore 12.15.0 exposes matching factories (Android 34.15.0 already has them)
  • Tooling & docs: upgrade firebase-tools 15.22.4; fix pipelines search index JSON; add verify-firestore-indexes.sh; add compare-types parity work queue (OKF); update docs/migrating-to-v26.mdx, sdk-compatibility tables, and compare-types config reasons

Related PRs

Test plan

  • yarn compare:types
  • yarn lerna:prepare, yarn tsc:compile, yarn tsc:compile:consumer
  • yarn lint:js, yarn lint:markdown
  • Jest: pipelines, StorageTask, runTransaction, aggregateEqual, native module contracts
  • E2e: Pipeline.e2e.js, Transaction.e2e.js, StorageTask.e2e.js on macOS, iOS, and Android (iOS upload mid-cancel skipped — firebase-ios-sdk#16353)

@cursor

This comment was marked as low quality.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request achieves full type and API parity for the firestore-pipelines package and aligns several core Firebase modular APIs with the firebase-js-sdk. By leveraging TurboModules to remove unnecessary bridge-forced Promise wrappers, the SDK now provides more idiomatic synchronous APIs. The changes also include robust index verification for search pipelines and stricter documentation policies for any remaining API drift.

Highlights

  • Firestore Pipelines Parity: Achieved full compare-types parity for firestore-pipelines by implementing the search spine (search, define, documentMatches, score, geoDistance, parent) with native iOS/Android lowering and tests.
  • API Parity and Sync Conversions: Aligned modular types and runtime signatures with firebase-js-sdk, converting several previously async bridge methods (e.g., logEvent, initializeAppCheck, initializeFirestore) to synchronous signatures where appropriate.
  • Tooling and Documentation: Upgraded firebase-tools to 15.22.4, added post-deploy index verification, and introduced a new 'Justification bar' in the compare-types documentation to strictly enforce change-authoring quality standards.
Ignored Files
  • Ignored by pattern: .github/workflows/** (6)
    • .github/workflows/scripts/README-firestore.md
    • .github/workflows/scripts/deploy-firestore.sh
    • .github/workflows/scripts/firestore.pipelines-e2e.indexes.json
    • .github/workflows/scripts/functions/package.json
    • .github/workflows/scripts/functions/yarn.lock
    • .github/workflows/scripts/verify-firestore-indexes.sh
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aligns several React Native Firebase modular APIs and types with the firebase-js-sdk to achieve better type parity and synchronous signature alignment. Key updates include converting logEvent, initializeAppCheck, and initializeFirestore to synchronous returns, adding Firestore pipeline support for search and define stages, and updating firebase-tools to version 15.22.4. Feedback on these changes highlights critical runtime bugs in both the Java and Swift pipeline node builders where coerceDocumentPathValue incorrectly falls back to the original value instead of the unwrapped resolved variable. Additionally, a type signature error was identified in StorageObserver that incorrectly restricts the nullability of the error property.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/firestore/ios/RNFBFirestore/RNFBFirestorePipelineNodeBuilder.swift Outdated
Comment thread packages/storage/lib/types/storage.ts Outdated
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 58.94737% with 312 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.65%. Comparing base (855a6fc) to head (2cf18ab).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9088      +/-   ##
============================================
+ Coverage     57.95%   58.65%   +0.70%     
- Complexity     1563     1616      +53     
============================================
  Files           503      503              
  Lines         38574    39178     +604     
  Branches       5719     5807      +88     
============================================
+ Hits          22353    22976     +623     
+ Misses        14845    14800      -45     
- Partials       1376     1402      +26     
Flag Coverage Δ
android-native 53.56% <48.94%> (+0.90%) ⬆️
e2e-ts-android 49.98% <50.86%> (+0.50%) ⬆️
e2e-ts-ios 53.96% <60.72%> (+0.33%) ⬆️
e2e-ts-macos 41.49% <26.09%> (+0.03%) ⬆️
ios-native 53.96% <60.72%> (+0.33%) ⬆️
jest 49.58% <82.82%> (+1.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mikehardy mikehardy force-pushed the compare-types-work-queue branch from ea12229 to 3af684f Compare July 5, 2026 13:08
@cursor

This comment was marked as low quality.

@mikehardy mikehardy force-pushed the compare-types-work-queue branch from 3af684f to 991a4a9 Compare July 5, 2026 20:42
@cursor

This comment was marked as low quality.

1 similar comment
@cursor

This comment was marked as low quality.

@mikehardy mikehardy changed the title feat(firestore/pipelines): achieve full compare-types parity for pipelines feat!: achieve full compare-types parity for pipelines / fix loads of other types drift Jul 6, 2026
@mikehardy mikehardy requested a review from russellwheatley July 6, 2026 02:59
@mikehardy mikehardy force-pushed the compare-types-work-queue branch from e430ebb to b0084e3 Compare July 6, 2026 03:11
@cursor

This comment was marked as low quality.

1 similar comment
@cursor

This comment was marked as low quality.

@mikehardy mikehardy force-pushed the pipeline-continue-workqueue branch from 4da576e to a860457 Compare July 6, 2026 12:23
Base automatically changed from pipeline-continue-workqueue to main July 6, 2026 14:13
mikehardy added 14 commits July 6, 2026 09:15
- Firestore: align onSnapshotsInSync observer next and error callback types.
- Firestore pipelines: align StageOptions, TimeGranularity, and isType declarations.
- Storage: rename upload return types to UploadResult and UploadTask.
- App Check: export AppCheckTokenListener type alias.
- Functions: add compare-types registry and align FunctionsError exports.
- App: make NativeFirebaseError structurally assignable to FirebaseError.
- Remote Config and Storage: use FirebaseError in modular error callbacks.
…ures

BREAKING CHANGE: logEvent, initializeAppCheck, and initializeFirestore return
synchronously; remove await and .then() chains on these APIs.

- Analytics: align logEvent return type with firebase-js-sdk sync void.
- App Check: align initializeAppCheck with sync AppCheck return.
- Firestore: align initializeFirestore with sync Firestore return.
- Firestore: export aggregateFieldEqual for aggregate query parity.
- Remote Config: accept RemoteConfigOptions in getRemoteConfig.
- Remote Config: document native FetchStatus literals as intentional drift.
- Docs: add firebase-js-sdk API parity improvements to v26 migration guide.
Align constant() with firebase-js-sdk preferIntegers overload and integerLiteral serialization at iOS/Android parse time; compare-types firestore-pipelines differentShape cleared; preferIntegers Pipeline e2e on macOS/iOS/Android.
Canonicalize acceptable exceptions (intractable-limitation bar and user-accepted deferral) in change authoring; reference from coverage, compare-types, and package workflows.
@mikehardy mikehardy force-pushed the compare-types-work-queue branch from ea33a45 to 2cf18ab Compare July 6, 2026 14:16
@cursor

This comment was marked as low quality.

@mikehardy mikehardy merged commit 3933b45 into main Jul 6, 2026
22 checks passed
@mikehardy mikehardy deleted the compare-types-work-queue branch July 6, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant